;; zig 配置
(require 'init-package)

;; (if (treesit-available-p)
;;     (progn
;;       (setq-local zig-source-alist
;;                   '((zig        . ("https://github.moeyy.xyz/https://github.com/GrayJack/tree-sitter-zig"))))
;;       (dolist (source zig-source-alist)
;;         (push source treesit-language-source-alist)
;;         (unless (treesit-ready-p (car source))
;;           (treesit-install-language-grammar (car source))))

;;       (add-to-list 'auto-mode-alist '("\\.zig\\'" . zig-ts-mode))
;;       (add-hook 'zig-ts-mode-hook (lambda ()
;;                                     (eglot-ensure))))
(when (maybe-require-package 'zig-mode)
  (add-hook 'zig-mode-hook
            (lambda ()
              (eglot-ensure)
              )))

(provide 'init-zig)
